import Button from "components/Base/Button";
import Icon from "components/Base/Icon";
import DataTable from "components/Base/DataTable";
import {getBpDeviceType} from "../../../../models/deviceType";
import moment from "moment";

export default (self) => [

  {
    title: 'id',
    name: 'id',
    formItem: {
      type: 'hidden',
    }
  },
  {
    title: '区域名字',
    name: 'name',
    tableItem: {
    },
    formItem: {
      rules: [
        {
          required: true,
          message: '请输入区域名字'
        }
      ]
    },
  },
  {
    title: '医院数量',
    name: 'size',
    tableItem: {
    },
    formItem: {
      type: 'hidden'
    }
  },

  {
    title: '操作',
    tableItem: {
      width: 180,
      align: 'center',
      render: (text, record) => (
        <DataTable.Oper>
          <Button tooltip="修改" onClick={e => self.onUpdate(record)}>
            <Icon type="edit"/>
          </Button>
          <Button tooltip="删除" onClick={e => self.onDelete(record)}>
            <Icon type="trash"/>
          </Button>
        </DataTable.Oper>
      )
    }
  }
]
